package com.pocket.cloud.order.config;

import com.alibaba.cloud.nacos.discovery.reactive.NacosReactiveDiscoveryClient;
import com.alibaba.cloud.nacos.loadbalancer.LoadBalancerNacosAutoConfiguration;
import com.alibaba.cloud.nacos.loadbalancer.NacosLoadBalancer;
import com.alibaba.cloud.nacos.loadbalancer.NacosLoadBalancerClientConfiguration;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;
import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <a href="https://blog.csdn.net/zhangyingchengqi/article/details/129981495">配置参考</a> </br>
 * <a href="https://blog.csdn.net/zhangyingchengqi/article/details/129981495">配置参考</a> </br>
 * @author zhaozhile
 */
@Configuration
@LoadBalancerClients(
        // 指定默认轮询算法。默认为 随机算法，此处再配置文件中开启了 loadbalancer.nacos.enabled: true 将默认使用：NacosLoadBalancer
        // defaultConfiguration = {***.class},
        // 单个服务使用 自定义负载均衡器 【cloud-loadbalancer-3.2】
        value = {
            @LoadBalancerClient(name = "pocket-payment", configuration = {CustomRandomLoadBalancerClient.class})
        })
public class LoadBalancerConfig {


}
